home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 119
/
(Vol 119) Nov 09 2010.iso
/
Games
/
crusade_of_cuisine.swf
/
scripts
/
frame_3
/
DoAction.as
Wrap
Text File
|
2010-11-09
|
3KB
|
139 lines
stop();
var treeTimer = 0;
var optionPresented = 0;
var modeCounter = 1;
var mode_text = "unknown";
var difficulty = 1;
var instructionPresented = 0;
menu_whole.onEnterFrame = function()
{
treeTimer++;
treeTimer %= 1200;
if(treeTimer == 500)
{
this.menu_tree.tree_1.gotoAndPlay("tree_hide");
}
if(treeTimer == 600)
{
this.menu_tree.tree_2.gotoAndPlay("tree_hide");
}
if(treeTimer == 700)
{
this.menu_tree.tree_3.gotoAndPlay("tree_hide");
}
if(treeTimer == 800)
{
this.menu_tree.tree_4.gotoAndPlay("tree_hide");
}
if(treeTimer == 1100)
{
this.menu_tree.tree_1.gotoAndPlay("tree_hide");
this.menu_tree.tree_2.gotoAndPlay("tree_hide");
this.menu_tree.tree_3.gotoAndPlay("tree_hide");
this.menu_tree.tree_4.gotoAndPlay("tree_hide");
}
optionButton();
instructionButton();
};
menu_whole.credit_btn.onRelease = function()
{
creditRoll_mv.gotoAndPlay("play");
};
optionButton = function()
{
if(optionPresented == 1)
{
option_mov._y += 20;
if(option_mov._y >= 100)
{
option_mov._y = 100;
}
}
if(optionPresented == 0)
{
option_mov._y -= 20;
if(option_mov._y <= -250)
{
option_mov._y = -250;
}
}
if(modeCounter == 0)
{
option_mov.mode_text = "Easy";
difficulty = 0.5;
}
if(modeCounter == 1)
{
option_mov.mode_text = "Normal";
difficulty = 1;
}
if(modeCounter == 2)
{
option_mov.mode_text = "Hard";
difficulty = 1.5;
}
menu_whole.option_btn.onRelease = function()
{
optionPresented++;
optionPresented %= 2;
};
option_mov.mode_btn.onRelease = function()
{
modeCounter++;
modeCounter %= 3;
};
};
instructionButton = function()
{
if(instructionPresented == 1)
{
instruction_mov._y += 20;
if(instruction_mov._y >= 250)
{
instruction_mov._y = 250;
}
}
if(instructionPresented == 0)
{
instruction_mov._y -= 20;
if(instruction_mov._y <= -400)
{
instruction_mov._y = -400;
}
}
menu_whole.inst_btn.onRelease = function()
{
instructionPresented++;
instructionPresented %= 2;
};
instruction_mov.lina_profile_btn.onRelease = function()
{
instruction_mov.gotoAndStop("profile_lina");
};
instruction_mov.nelly_profile_btn.onRelease = function()
{
instruction_mov.gotoAndStop("profile_nelly");
};
instruction_mov.char_btn.onRelease = function()
{
instruction_mov.gotoAndStop("profile_nelly");
};
instruction_mov.control_btn.onRelease = function()
{
instruction_mov.gotoAndStop("control");
};
instruction_mov.weapon_btn.onRelease = function()
{
instruction_mov.gotoAndStop("weapon");
};
instruction_mov.other_btn.onRelease = function()
{
instruction_mov.gotoAndStop("other");
};
};
menu_whole.newgame_btn.onRelease = function()
{
gotoAndStop("story_1");
play();
};